﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class Admin_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnLogIn_Click(object sender, EventArgs e)
    {
        string AdminUName = JobSiteStarterKit.BOL.Common.ReadCommonSettingsAttributes("AdminUserName", this.Context);
        string AdminPwd = JobSiteStarterKit.BOL.Common.ReadCommonSettingsAttributes("AdminPwd", this.Context);
        if (txtUserName.Text == AdminUName && txtPassword.Text == AdminPwd)
        {
            
            lblError.Visible=false;
            Session["AdminUid"] = AdminUName;
            Session["AdminPass"] = AdminPwd;
            Response.Redirect("../Admin/AdminLogin.aspx");
        }
        else
        {
            lblError.Visible = true;
            lblError.Text = "User Name and Password is not valid..,Try Again!!";
        }
    }
}
